[Identity] Revert regional auth env var change#44663
Merged
pvaneck merged 2 commits intoAzure:mainfrom Jan 17, 2026
Merged
Conversation
We've decided to shelve this for now until the picture for ESTS-R support becomes more clear. This intrduces some baggage that is a bit undesirable, and it's still possible to use regional auth endpoints without this change through the use of the AZURE_AUTHORITY_HOST env var or by explicitly passing in a regional endpoint to a credential constructor via the `authority` kwarg. Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reverts the regional authority environment variable change introduced in PR #44347, removing support for AZURE_REGIONAL_AUTHORITY_NAME from the internal AadClient and AadClientBase classes. The change removes the region discovery logic and regional authority URL construction from these internal clients while preserving support in MSAL-based credentials through msal_credentials.py.
Changes:
- Removed regional authority initialization logic from
AadClientandAadClientBaseclasses - Removed calls to
_initialize_regional_authority()from all token acquisition methods - Removed region discovery and URL building helper methods
- Removed associated test cases for regional authority functionality in internal AAD clients
- Updated CHANGELOG to remove the fixed issue entry
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
sdk/identity/azure-identity/azure/identity/_internal/aad_client_base.py |
Removed _regional_authority attribute, regional authority helper methods, and reverted token URL construction to use only _authority |
sdk/identity/azure-identity/azure/identity/_internal/aad_client.py |
Removed _initialize_regional_authority() calls and implementation, removed unused imports |
sdk/identity/azure-identity/azure/identity/aio/_internal/aad_client.py |
Removed async regional authority initialization calls and implementation, removed unused imports |
sdk/identity/azure-identity/tests/test_aad_client.py |
Removed test cases for regional authority functionality |
sdk/identity/azure-identity/tests/test_aad_client_async.py |
Removed async test cases for regional authority functionality |
sdk/identity/azure-identity/CHANGELOG.md |
Removed changelog entry about the regional authority bug fix |
chlowell
approved these changes
Jan 16, 2026
scottaddie
approved these changes
Jan 17, 2026
Member
Author
|
/check-enforcer override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change reverts #44347.
We've decided to shelf this for now until the picture for ESTS-R support becomes more clear. This introduced some baggage that was a bit undesirable, and it's still possible to use regional auth endpoints without this change through the use of the
AZURE_AUTHORITY_HOSTenv var or by explicitly passing in a regional endpoint to a credential constructor via theauthoritykwarg.